package ee.videorentalstore.protocols.commands;

import ee.videorentalstore.UserAndProtocolManager;
import ee.videorentalstore.users.User;

public class WhoIsInControlCommand extends Command
{
	@Override
	public String getCommandDescription() 
	{
		return "WHO IS IN CONTROL";
	}
	
	
	@Override
	public void executeCommand(String inputStreamInstructionsToProcess) 
	{
		User userCurrentlyInControl = UserAndProtocolManager.getInstance().getCurrentUserInControl();
		System.out.println("User currently in control is:\n" +
				"Name: " + userCurrentlyInControl.getUserName() + ", \n" +
				"ID: " + userCurrentlyInControl.getUserID() + ", \n" +
				"Type: " + userCurrentlyInControl.getUserTypeName());
	}
}
